package com.brainsitter.functions;

import java.sql.Date;
import java.sql.Time;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import android.util.Log;

public class ProgramFunction {
	
	public static String convertYYYYMMDDToNormal(Date date){
		SimpleDateFormat format = new SimpleDateFormat("EEE, MMM dd,  yyyy");
		Log.d("CONVERTING DATE:", "HELLO WORLD!");
		String newDate = date.toString();
		try {
			newDate = format.format(date);
			Log.d("Date:", newDate);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return newDate;
	}
	
	

	public static String convertSQLTimeToNormal(Time date){
		SimpleDateFormat format = new SimpleDateFormat("hh:mm aa");
		Log.d("CONVERTING Time:", "HELLO WORLD!");
		String newDate = date.toString();
		try {
			newDate = format.format(date);
			Log.d("Date:", newDate);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return newDate;
	}
	
	
	
	
	
}
